import request from '/@/utils/request';

export function floorList(query?: Object) {
    return request({
        url: '/floor/floor/page',
        method: 'get',
        params: query,
    });
}

export function getFloor(floorId?: Number) {
    return request({
        url: '/floor/floor/getFloorById',
        method: 'get',
        params: { floorId }
    });
}

export function addFloor(data: any) {
    return request({
        url: '/floor/floor/addFloor',
        method: 'post',
        data: data,
    });
}

export function deleteFloor(ids: Number[]) {
    return request({
        url: '/floor/floor/deleteFloor',
        method: 'delete',
        params: { ids },
    });
}

export function updateFloor(data: any) {
    return request({
        url: '/floor/floor/updateFloor',
        method: 'put',
        data: data,
    });
}
